﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
</head>
<body>
<div class="data-wrap" style="margin:5px;">
    <div class="data-tool clearfix">
        <div class="pull-right clearfix">
            <form class="form-inline" id="formSearch">
                <div class="input-group" style="margin-left:170px;">
                    <label class="input-group-addon">权限名称：</label>
                    <input class="form-control wd100" name="pName" type="text" value="">
                    <button type="button" class="btn btn-default m5_l" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </div>
            </form>
        </div>
    </div>

    <div class="menuPermissionPaging"></div>
</div>
<script type="text/x-dot-template" id="templatePager">

    <table class="table">
        <thead>
            <tr>
                <th class="t_l">权限名称</th>
                <th class="t_l wd150">权限代码</th>
                <th width="75">操作</th>
            </tr>
        </thead>
    </table>

    <div class="data-body data-scroll">
        <div class="data-div-view">
            <table class="table table-hover">
                <tbody>
                    {{? it.tData && it.tData.length>0}}
                    {{~it.tData :item:index}}
                    <tr>
                        <td class="t_l">{{= item.pName }}</td>
                        <td class="t_l wd150">{{= item.pCode }}</td>
                        <td width="75">
                            <button type="button" class="btn btn-default" data-id="{{= item.pid }}" data-name="{{= item.pName }}" data-code="{{= item.pCode }}" data-sortNo="{{= item.sortNo }}" id="btn_{{= item.pid }}" onclick="doSelect(this);">选择</button>
                        </td>
                    </tr>
                    {{~}}
                    {{??}}
                    <tr class="noRecord">
                        <td colspan="4">暂无记录！</td>
                    </tr>
                    {{?}}
                </tbody>
            </table>
        </div>
    </div>
    <!-- 必要的分页参数设置 -->
    <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
</script>
        <script type="text/javascript">
            var parent = artDialog.open.origin;

            function doSelectFilter() {
                eval(function (p, a, c, k, e, r) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('5.$("j.u>s>B").o(6(d){1 e=$(0).h("9[7=\'p\']").g();1 f=$("#i"+e);$(f).4("2");$(f).k("l","").m("n",6(){1 a=[];1 b=$(0).q(\'2\');r(!b){$(0).4("2");1 c={};c.t=$(0).3("v");c.w=$(0).3("7");c.x=$(0).3("y");a.z(c);5.A(a);$(0).8("已选")}});$(f).8("已选")});', 38, 38, 'this|var|disabled|data|addClass|parent|function|name|text|input|||||||val|find|btn_|table|attr|onclick|bind|click|each|permissionId|hasClass|if|tbody|pid|menuPermissions|id|pName|pCode|code|push|insertRow|tr'.split('|'), 0, {}))
            }
            function doSelect(obj) {
                eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(a) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('3 4=[];3 6=$(0).8(\'5\');c(!6){$(0).7("5");3 1={};1.9=$(0).2("b");1.j=$(0).2("d");1.e=$(0).2("f");4.g(1);h.i(4);$(0).a("已选")}', 20, 20, 'obj|permission|data|var|menuPermissionArray|disabled|css|addClass|hasClass|pid|text|id|if|name|pCode|code|push|parent|insertRow|pName'.split('|'), 0, {}))
            }

            $(function () {
                FlashPay.UI.DoSearch();

                $("#btnSearch").click(function () {
                    window.currentPage = null;
                    doSearch();
                });
            });

            $(document).keyup(function (event) {
                var keycode = event.which;
                if (keycode == 13) {
                    doSearch();
                }
            }); 

            function doSearch() {

                FlashPay.UI.Pager(".menuPermissionPaging", { templateId: "templatePager", ajax: { url: '/Menu/GetMenuPermission' } });

                eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('1(0(){3()},2)', 4, 4, 'function|setInterval|100|doSelectFilter'.split('|'), 0, {}))
            }
        </script>
</body>
</html>